
class  Person {
    private String name;


    public void setName(String name) {
        this.name = name;

    }

    private void sleep(){
        System.out.println(this.name+"吃饭");
    }

    public void eat(){
        this.sleep();
    }
    public String toString(){
        return "Person{"+"name"+'}';
    }


}

public  class TestDemo {

    public static void main(String[] args) {

        Person person1 = new Person();
        person1.setName("lanlan");
           person1.eat();
        System.out.println(person1);
    }
}
